package pong.game.location;

import physic.engine.MoveEngine;
import android.graphics.Bitmap;
import android.graphics.Canvas;


public class LevelMap 
{
	int						heightWorld	= 1,
							widthWorld	= 1;
	Bitmap					background	= null;
	
	public MoveEngine		Physic;
	
	public LevelMap(Bitmap background)
	{
		this.background = background;
		heightWorld 	= background.getHeight();
		widthWorld		= background.getWidth();
		Physic 			= new MoveEngine((float)(widthWorld)/heightWorld);
	}
	
	public void render(Canvas canvas)
	{
		canvas.drawBitmap(background, 0, 0, null);
		for(int q=0; q<Physic.GameObjects.size(); q++)
			Physic.GameObjects.get(q).render(canvas);
	}
	public void run()
	{
		Physic.run();
	}
}
